<!--
 $ @Author: liujiajun 45444154+wo1261931780@users.noreply.github.com
 $ @Date: 2022-06-12 19:53:04
 $ @LastEditors: liujiajun 45444154+wo1261931780@users.noreply.github.com
 $ @LastEditTime: 2022-06-12 19:53:09
 $ @FilePath: \st-html.github.io\src\aaa012\a067背景属性.html
 $ @Description: 1111
 $ @
 $ @Copyright (c) 2022 by liujiajun 45444154+wo1261931780@users.noreply.github.com, All Rights Reserved.
 -->
<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible"
              content="IE=edge">
        <meta name="viewport"
              content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
            div {
                width: 300px;
                height: 300px;
                background-color: #ccc;
                background-position: center;
                text-align: center;
            }
        </style>
    </head>

    <body>
        <div>
            <img src="../img/demo.png"
                 title="我是div图片">
        </div>
        <hr>
        <!-- 如果在div中放一张图片，那么就算图片很大，也会被div本身的尺寸限制 -->
        <img src="../img/demo.png"
             alt="我是img图片">
        <!-- img用来存放比较重要的图片 -->
    </body>

</html>